#ifndef ITTCALCOBJ_H
#define ITTCALCOBJ_H

#include <windows.h>

class IttCalcObj
{
public:
	enum COTYPE
	{
		CO_BEGIN = 0,
		CO_POINT,
		CO_NOT,
		CO_AND,
		CO_OR,
		CO_END,
	};
protected:
	bool m_bDragging;
	bool m_bSelect;
public:
	IttCalcObj();
	virtual int draw(HDC hdc) = 0;
	virtual int flash(HDC hdc) = 0;
	virtual bool hit(int x, int y) = 0;
	virtual int dragBegin() = 0;
	virtual int dragOver() = 0;
	virtual int destroy() = 0;
	virtual bool isDragging();
	virtual int select();
	virtual int drop();
	virtual bool getSelect();
	virtual COTYPE getType() = 0;
};

#define DEFAULTIMPL(classname) \
	int classname::draw(HDC hdc){return 0;}\
	int classname::flash(HDC hdc){return 0;}

#endif